home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 15 / Amiga Plus Leser CD 15.iso / Tools / Freeware / PerfectPaint / rexx / Anim / Operators / Wave < prev   
Encoding:
Text File  |  2002-03-13  |  1.4 KB  |  89 lines

  1. /* Effect Operators Mosaic
  2. 000
  3. */
  4.  
  5.     call addlib("rexxmathlib.library", 5, -30, 0)
  6.  
  7.     options results
  8.     parse ARG Port Opt1 Opt2 Opt3 s0 t0 s1 t1 b
  9.         
  10.     ADDRESS value Port
  11.  
  12.     pp_GetWidth
  13.     w=result
  14.     pp_GetHeight
  15.     h=result
  16.     pp_GetDepth
  17.     D=result
  18.  
  19.         pp_ComposeReqOff
  20.         pp_GetCurrentBrush
  21.         CB=result
  22.         pp_FindEmptyBrush
  23.         Brush=result
  24.         pp_SetBrush Brush
  25.         pp_GotoFrame s1
  26.         pp_PicttoSpare
  27.         pp_GotoFrame s0            
  28.         pp_Pickbrush 0 0 W H 1
  29.  
  30.         step=(s1-s0)
  31.         Step_f0=-10/Step
  32.         Step_f1=1000/Step
  33.  
  34.         pp_Compose 0 100 0    
  35.         pp_EffectOn
  36.         do i=s0 to s1
  37.             IF t1=1 then DO
  38.                 pp_GotoFrame (s1+i-s0)
  39.                 pp_PicttoSpare
  40.             END
  41.             pp_GotoFrame i
  42.             f0=Step_f0*(i-s0)
  43.             f1=Step_f1*(i-s0)
  44.             IF t0=0 then DO
  45.                 pp_EffectOff
  46.                 pp_Plot W/2 H/2
  47.                 pp_EffectOn
  48.             END
  49.             pp_Sin 1 trunc(f0) trunc(f1) trunc(f0) trunc(f1)
  50.             pp_boxf 0 0 W H
  51.         END
  52.  
  53.         Step_f=100/Step
  54.         Step_f0=10/Step
  55.         Step_f1=-1000/Step
  56.  
  57.         pp_GotoFrame s0
  58.         pp_SpareOnOff
  59.         pp_PickBrush 0 0 W H 1
  60.         pp_SpareOnOff
  61.  
  62.         do i=s0 to s1
  63.             pp_GotoFrame i
  64.             pp_SpareOnOff
  65.             pp_EffectOff
  66.             pp_Plot W/2 H/2
  67.             pp_EffectOn
  68.             f0=-10+Step_f0*(i-s0)
  69.             f1=1000+Step_f1*(i-s0)
  70.             f=Step_f*(i-s0)
  71.             pp_Compose 0 100 0            
  72.             pp_Sin 1 trunc(f0) trunc(f1) trunc(f0) trunc(f1)
  73.             pp_boxf 0 0 W H
  74.             pp_SpareOnOff
  75.             pp_Spare
  76.             pp_Compose 0 f 0
  77.             pp_boxf 0 0 W H            
  78.         END            
  79.  
  80.         pp_Gotoframe s0
  81.         pp_Sin 1 30 1000 30 1000
  82.         pp_FreeBrush
  83.         pp_SetBrush CB
  84.  
  85.         pp_EffectOff
  86.         pp_ComposeReqOn    
  87.  
  88.     EXIT
  89.